package com.fivestar.finance.app.bean.resp;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 *
 * Created by hjd on 2016/5/26.
 */
public class MerchantResp implements Serializable, Parcelable {

    String userId;//用户id
    String storeName;//商户名称
    String storeAddress;//门面地址、商户地址
    String portraitPicUrl;//商户头像
    int cardAuthenState;//身份是否认证
    int merchantAuthenState;//商户是否认证
    double payment;//本月待付
    double score;//综合评分


    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public String getStoreAddress() {
        return storeAddress;
    }

    public void setStoreAddress(String storeAddress) {
        this.storeAddress = storeAddress;
    }

    public String getPortraitPicUrl() {
        return portraitPicUrl;
    }

    public void setPortraitPicUrl(String portraitPicUrl) {
        this.portraitPicUrl = portraitPicUrl;
    }

    public int getCardAuthenState() {
        return cardAuthenState;
    }

    public void setCardAuthenState(int cardAuthenState) {
        this.cardAuthenState = cardAuthenState;
    }

    public int getMerchantAuthenState() {
        return merchantAuthenState;
    }

    public void setMerchantAuthenState(int merchantAuthenState) {
        this.merchantAuthenState = merchantAuthenState;
    }

    public double getPayment() {
        return payment;
    }

    public void setPayment(double payment) {
        this.payment = payment;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.userId);
        dest.writeString(this.storeName);
        dest.writeString(this.storeAddress);
        dest.writeString(this.portraitPicUrl);
        dest.writeInt(this.cardAuthenState);
        dest.writeInt(this.merchantAuthenState);
        dest.writeDouble(this.payment);
        dest.writeDouble(this.score);
    }

    public MerchantResp() {
    }

    protected MerchantResp(Parcel in) {
        this.userId = in.readString();
        this.storeName = in.readString();
        this.storeAddress = in.readString();
        this.portraitPicUrl = in.readString();
        this.cardAuthenState = in.readInt();
        this.merchantAuthenState = in.readInt();
        this.payment = in.readDouble();
        this.score = in.readDouble();
    }

    public static final Creator<MerchantResp> CREATOR = new Creator<MerchantResp>() {
        @Override
        public MerchantResp createFromParcel(Parcel source) {
            return new MerchantResp(source);
        }

        @Override
        public MerchantResp[] newArray(int size) {
            return new MerchantResp[size];
        }
    };

    @Override
    public String toString() {
        return "MerchantResp{" +
                "userId='" + userId + '\'' +
                ", storeName='" + storeName + '\'' +
                ", storeAddress='" + storeAddress + '\'' +
                ", portraitPicUrl='" + portraitPicUrl + '\'' +
                ", cardAuthenState=" + cardAuthenState +
                ", merchantAuthenState=" + merchantAuthenState +
                ", payment=" + payment +
                ", score='" + score + '\'' +
                '}';
    }
}
